home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_01 / yuen / bigjob.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-07  |  47.8 KB  |  1,255 lines

  1. /********     bigjob C Program Source Code File (.C)           ********/
  2. /*                                      */
  3. /* PROGRAM NAME: bigjob       Application (bigjob)              */
  4. /* -------------                              */
  5. /* Generated by GPF (Gui Programming Facility) Version 1.3 Level(01)  */
  6. /*                                      */
  7. /* DATABASE NAME: No                              */
  8. /* -------------                              */
  9. /*                                      */
  10. /* DATE AND TIME: Thu May 27 20:03:25 1993                  */
  11. /*                                      */
  12. /* Windows 3                                  */
  13. /*                                      */
  14. /* COPYRIGHT:                                  */
  15. /* ----------                                  */
  16. /* Andy Yuen 1993                              */
  17. /*                                      */
  18. /* REVISION LEVEL: 1.0                              */
  19. /* ---------------                              */
  20. /*                                      */
  21. /* WHAT YOU NEED TO COMPILE THIS PROGRAM:                  */
  22. /* --------------------------------------                  */
  23. /*                                      */
  24. /*  REQUIRED FILES:                              */
  25. /*  ---------------                              */
  26. /*                                      */
  27. /*    bigjob.C         - Source code                      */
  28. /*    bigjob.Cmd     - Command file to build this program          */
  29. /*    bigjob.Mak     - Make file for this program              */
  30. /*    bigjob.Def     - Module definition file                  */
  31. /*    bigjob.Ext     - External definition file               */
  32. /*    bigjob.H         - Application header file                  */
  33. /*    bigjob.Ids     - Windows header file                  */
  34. /*    bigjob.L         - Linker automatic response file              */
  35. /*    bigjob.Rc      - Resource file                      */
  36. /*                                      */
  37. /*    WINDOWS.H      - Windows include file                  */
  38. /*    STDLIB.H         - Miscellaneous function declarations          */
  39. /*    STDIO.H         - Declarations for standard I/O routines          */
  40. /*    STRING.H         - String function declarations              */
  41. /*    MALLOC.H         - Definitions for memory allocation functions    */
  42. /*                                      */
  43. /*  REQUIRED LIBRARIES:                           */
  44. /*  -------------------                           */
  45. /*                                      */
  46. /*    LIBW.LIB         - Windows Dos library                  */
  47. /*    LLIBCEW.LIB    - DosWind mode/standard combined large model C.  */
  48. /*                                      */
  49. /*  REQUIRED PROGRAMS:                              */
  50. /*  ------------------                              */
  51. /*                                      */
  52. /*    C Compiler                              */
  53. /*    Linker                                  */
  54. /*    Resource Compiler                           */
  55. /*                                      */
  56. /**********************************************************************/
  57.  
  58. /**********************************************************************/
  59. /*                                      */
  60. /* Include relevant sections of the WINDOWS header file.          */
  61. /*                                      */
  62. /**********************************************************************/
  63.  
  64. #include <windows.h>                  /* Windows include file */
  65.  
  66. /**********************************************************************/
  67. /*                                      */
  68. /* Include C library routine header files                  */
  69. /*                                      */
  70. /**********************************************************************/
  71.  
  72. #include <stdlib.h>     /* Miscellaneous function declarations       */
  73. #include <stdio.h>     /* Declarations for standard I/O routines    */
  74. #include <string.h>     /* String function declarations          */
  75. #include <malloc.h>     /* Definitions for memory allocation          */
  76. #include <math.h>
  77. /**********************************************************************/
  78. /*                                      */
  79. /* Miscellaneous constants Ids                          */
  80. /*                                      */
  81. /**********************************************************************/
  82.  
  83. #include "bigjob.Ids"
  84.  
  85. /**********************************************************************/
  86. /*                                      */
  87. /* Function prototypes for private C functions                  */
  88. /*                                      */
  89. /**********************************************************************/
  90.  
  91. #define EXTERN
  92.  
  93. #include "bigjob.Ext"
  94.  
  95. /**********************************************************************/
  96. /*                                      */
  97. /* STATIC Function prototypes for private C functions              */
  98. /*                                      */
  99. /**********************************************************************/
  100.  
  101. static VOID WmCreateMainWindow( PGPFPARMS pGpfParms );
  102. static VOID WmPaintMainWindow( PGPFPARMS pGpfParms );
  103. static VOID ActionRep10( PGPFPARMS pGpfParms );
  104. static VOID ActionRep100( PGPFPARMS pGpfParms );
  105. static VOID ActionRep1000( PGPFPARMS pGpfParms );
  106. static VOID ActionRep10000( PGPFPARMS pGpfParms );
  107. static VOID ActionStart( PGPFPARMS pGpfParms );
  108. static VOID ActionAbort( PGPFPARMS pGpfParms );
  109. static VOID CommandMainWindow( PGPFPARMS pGpfParms );
  110. static VOID InitializeApplication( VOID );
  111. static VOID EndApplication( VOID );
  112. int PASCAL WinMain(HANDLE hInst, HANDLE hPrevInstance,
  113.            LPSTR lpCmdLine,int nCmdShow);
  114.  
  115. /**********************************************************************/
  116. /*                                      */
  117. /*  Miscellaneous constants                          */
  118. /*                                      */
  119. /**********************************************************************/
  120. #define EXTRAWORDS (4 * sizeof(LPVOID)) /* Extra window words          */
  121. #define EXTRAWORDS_GPF    DLGWINDOWEXTRA
  122. #define EXTRAWORDS_USR (DLGWINDOWEXTRA + sizeof(LPVOID) )
  123. #define GPF_PMC_LEVEL 1         /* GpfPmc.lib Level          */
  124.  
  125. #define TID_USERMAX     0x7fff  /* Maximum user timer ID          */
  126.  
  127. #define HWND_DESKTOP  (HWND)0
  128. #define HWND_OBJECT   (HWND)0
  129.  
  130. /**********************************************************************/
  131. /*                                      */
  132. /*   Global variables                              */
  133. /*                                      */
  134. /**********************************************************************/
  135.  
  136. /*------------------------ General Definitions -----------------------*/
  137.  
  138. /* Query System preferences set by the user from the Control Panel    */
  139.  
  140.   HANDLE    hInstance;
  141.   HANDLE    hPrevInstance;
  142.   LPSTR     lpCmdLine;
  143.   int        nCmdShow;
  144.  
  145.   HWND hwndHelp  = (HWND)0;          /* Help Hwnd              */
  146. EXTERN HWND hwndMainWindow;
  147.  
  148. /**********************************************************************/
  149. /*                                      */
  150. /* Miscellaneous constants bigjob.H                      */
  151. /*                                      */
  152. /**********************************************************************/
  153.  
  154. #include "bigjob.H"
  155.  
  156. /****************** Start of main procedure ***************************/
  157. /**********************************************************************/
  158. /*                                      */
  159. /*  FUNCTION: WinMain                              */
  160. /*                                      */
  161. /*  This is a typical WINDOWS main function.                  */
  162. /*                                      */
  163. /*  FUNCTION: WinMain(HANDLE, HANDLE, LPSTR, int)              */
  164. /*                                      */
  165. /*  PURPOSE: calls initialization function, processes message loop.   */
  166. /*                                      */
  167. /*  It initializes WINDOWS, registers some window classes, creates a  */
  168. /*  main window, gets and dispatches messages to its window procedure */
  169. /*  until the time to quit, and then tidies up before terminating.    */
  170. /*                                      */
  171. /**********************************************************************/
  172.  
  173. int PASCAL WinMain(HANDLE hInst, HANDLE hPrevInst,
  174.            LPSTR CmdLine,int CmdShow)
  175. {
  176.  MSG msg;
  177.  
  178.   /********************************************************************/
  179.   /*   Initialize Application                          */
  180.   /********************************************************************/
  181.   hInstance = hInst;              /* Keep to global variables */
  182.   hPrevInstance = hPrevInst;          /* Keep to global variables */
  183.   lpCmdLine = CmdLine;              /* Keep to global variables */
  184.   nCmdShow = CmdShow;              /* Keep to global variables */
  185.   szTaskList = "BigJob";
  186.   LogoTimer = 3500;        /* Logo Timer                  */
  187.   EndOfAppl = FALSE;        /* Switch Accept End Application      */
  188.   AcceptMsgInfo = TRUE;     /* Accept MsgInfo              */
  189.  
  190.   InitializeApplication();
  191.  
  192.   /********************************************************************/
  193.   /*   Create the window "MainWindow".                      */
  194.   /********************************************************************/
  195.   CreateMainWindow(NULL);
  196.  
  197.   /********************************************************************/
  198.   /* Make sure the window was created.                      */
  199.   /********************************************************************/
  200.   if (!hwndMainWindow)
  201.       return (FALSE);
  202.  
  203.   /********************************************************************/
  204.   /*   Show the window "MainWindow".                      */
  205.   /********************************************************************/
  206.   ShowWindow(hwndMainWindow, nCmdShow);
  207.   ShowMainWindow(NULL);             /* Show Main Window   */
  208.  
  209.  
  210.   /********************************************************************/
  211.   /* Main message-processing loop - get and dispatch messages until   */
  212.   /* WM_QUIT received and Accepted (EndOfAppl = TRUE)              */
  213.   /********************************************************************/
  214.   PeekMessageLoop(&msg, &mtask);
  215.  
  216.  
  217.   /********************************************************************/
  218.   /* Tidy up and terminate                          */
  219.   /********************************************************************/
  220.  
  221.   /********************************************************************/
  222.   /* Dos Exit                                  */
  223.   /********************************************************************/
  224.   return (msg.wParam);
  225. }
  226. /**********************************************************************/
  227. /* End of main procedure                          */
  228. /**********************************************************************/
  229. /**********************************************************************/
  230.  
  231.  
  232. /**********************************************************************/
  233. /**********************************************************************/
  234. /*                                      */
  235. /*  WinProc: GpfDefWindowProc                          */
  236. /*                                      */
  237. /*  Controls the "DefaultWindowProc" Area.                  */
  238. /*                                      */
  239. /*                                      */
  240. /**********************************************************************/
  241.  
  242. LONG FAR PASCAL GpfDefWindowProc(
  243.         HWND hwnd, USHORT msg, WORD wParam, DWORD dwParam )
  244. {
  245.   HDC    hDC; /* handle Display Context use with the WM_PAINT message */
  246.   PAINTSTRUCT ps;          /* Paint structure for Paint functions */
  247.  
  248.   switch(msg)
  249.   {
  250.  
  251.     /**************************************************************/
  252.     /* The application has asked for the window to be destroyed.  */
  253.     /**************************************************************/
  254.    case WM_DESTROY:
  255.     GpfDestroyTemplate(hwnd);           /* Reset Help Instance */
  256.     break;
  257.  
  258.     /**************************************************************/
  259.     /* Things to do when the Window is Activated/Deactivated      */
  260.     /**************************************************************/
  261.    case WM_ACTIVATE:
  262.     if (wParam)
  263.         SetFocus(hwnd);
  264.     return    DefDlgProc( hwnd, msg, wParam, dwParam );
  265.  
  266.     /**************************************************************/
  267.     /* Let frame control erase background for us              */
  268.     /**************************************************************/
  269.    case WM_ERASEBKGND:
  270.     return( DefDlgProc(hwnd, msg, wParam, dwParam) );
  271.  
  272.        /***************************************************************/
  273.        /* The window needs painting.                      */
  274.        /***************************************************************/
  275.    case WM_PAINT:
  276.     hDC = BeginPaint( hwnd, &ps );
  277.     FillRect( hDC, &ps.rcPaint, GetStockObject(WHITE_BRUSH) );
  278.     EndPaint( hwnd, &ps );
  279.     break;
  280.  
  281.     /**************************************************************/
  282.     /* Things to do when the Window is Moved              */
  283.     /**************************************************************/
  284.    case WM_MOVE:
  285.     PostMessage( hwnd, WM_PAINT, NULL, NULL);    /* Paint Inf Msg */
  286.     UpdateWindow(hwnd);
  287.     break;
  288.  
  289.        /***************************************************************/
  290.        /*  The List Box needs to know how big to make an Item.          */
  291.        /***************************************************************/
  292.    case WM_MEASUREITEM:
  293.     return (LONG)GpfMeasureItem( hwnd, wParam, dwParam );
  294.     break;
  295.  
  296.     /**************************************************************/
  297.     /*  The List Box wants us to Draw an Item              */
  298.     /**************************************************************/
  299.    case WM_DRAWITEM:
  300.     return (LONG)GpfDrawItem( hwnd, wParam, dwParam );
  301.     break;
  302.  
  303.     /**************************************************************/
  304.     /* Things to do when the Window is End LogoTimer          */
  305.     /**************************************************************/
  306.    case WM_TIMER:
  307.     if (wParam != TID_USERMAX)
  308.         return  DefDlgProc( hwnd, msg, wParam, dwParam );
  309.     KillTimer(hwnd, TID_USERMAX);        /* Stop LogoTimer     */
  310.     /**************************************************************/
  311.     /* Simulate CANCEL - Post WM_CLOSE to Window              */
  312.     /**************************************************************/
  313.     PostMessage( hwnd, WM_CLOSE, NULL, NULL );    /* Send Message */
  314.     break;
  315.  
  316.        /***************************************************************/
  317.        /* Other messages are handled by the default window procedure. */
  318.        /***************************************************************/
  319.    default:
  320.     /* Pass all other messages to the default window procedure    */
  321.     return    DefDlgProc( hwnd, msg, wParam, dwParam );
  322.   }
  323.   return ((LONG) FALSE);
  324. }
  325. /**********************************************************************/
  326. /* End of window procedure - WinProc: GpfDefWindowProc              */
  327. /**********************************************************************/
  328. /**********************************************************************/
  329.  
  330.  
  331.  
  332. /**********************************************************************/
  333. /**********************************************************************/
  334. /*                                      */
  335. /*  PRIVATE FUNCTION : GpfSetCentreWindow                  */
  336. /*                                      */
  337. /*  Positions Window in the center of the screen              */
  338. /*                                      */
  339. /**********************************************************************/
  340.  
  341. VOID FAR PASCAL GpfSetCentreWindow( HWND hwnd )
  342. {
  343.  
  344.   int    iX, iY;
  345.   int    iScreenWidth, iScreenHeight;
  346.   int    iWndWidth, iWndHeight;
  347.   RECT    rcRect;
  348.  
  349.   /********************************************************************/
  350.   /* Query width and depth of screen device                  */
  351.   /********************************************************************/
  352.   iScreenWidth    = GetSystemMetrics( SM_CXSCREEN );
  353.   iScreenHeight = GetSystemMetrics( SM_CYSCREEN );
  354.  
  355.   /********************************************************************/
  356.   /* Query width and depth of Window                      */
  357.   /********************************************************************/
  358.   GetWindowRect( hwnd, &rcRect );
  359.  
  360.   /********************************************************************/
  361.   /* Calculate the width and the height of the window              */
  362.   /********************************************************************/
  363.   iWndWidth  = rcRect.right  - rcRect.left;
  364.   iWndHeight = rcRect.bottom - rcRect.top;
  365.  
  366.   /********************************************************************/
  367.   /* Center Window within the screen                      */
  368.   /********************************************************************/
  369.   iX = ( iScreenWidth  - iWndWidth  ) / 2;
  370.   iY = ( iScreenHeight - iWndHeight ) / 2;
  371.   SetWindowPos( hwnd, NULL, iX, iY, iWndWidth, iWndHeight, SWP_NOZORDER );
  372. }
  373. /**********************************************************************/
  374. /* End of GpfSetCentreWindow Private Function                  */
  375. /**********************************************************************/
  376. /**********************************************************************/
  377.  
  378.  
  379.  
  380. /**********************************************************************/
  381. /**********************************************************************/
  382. /*                                      */
  383. /*  PRIVATE FUNCTION :      GpfSetTopWindow                  */
  384. /*                                      */
  385. /*  Positions the Window in the Top of the screen              */
  386. /*                                      */
  387. /**********************************************************************/
  388.  
  389. VOID FAR PASCAL GpfSetTopWindow( HWND hwnd )
  390. {
  391.   int    iY;
  392.   int    iScreenHeight;
  393.   int    iWndWidth, iWndHeight;
  394.   RECT    rcRect;
  395.  
  396.   /*******************************************************************/
  397.   /* Query width and depth of screen device                 */
  398.   /*******************************************************************/
  399.   iScreenHeight = GetSystemMetrics( SM_CYSCREEN );
  400.  
  401.   /*******************************************************************/
  402.   /* Query width and depth of Window                     */
  403.   /*******************************************************************/
  404.   GetWindowRect( hwnd, &rcRect );
  405.  
  406.   /*******************************************************************/
  407.   /* Calculate the width and the height of the window             */
  408.   /*******************************************************************/
  409.   iWndWidth  = rcRect.right  - rcRect.left;
  410.   iWndHeight = rcRect.bottom - rcRect.top;
  411.  
  412.   /*******************************************************************/
  413.   /* Center Window within the screen                     */
  414.   /*******************************************************************/
  415.   iY = ( iScreenHeight - iWndHeight );
  416.   SetWindowPos( hwnd, NULL, rcRect.left, iY,
  417.         iWndWidth, iWndHeight, SWP_NOZORDER );
  418. }
  419. /**********************************************************************/
  420. /* End of GpfSetTopWindow Private Function                  */
  421. /**********************************************************************/
  422. /**********************************************************************/
  423.  
  424.  
  425.  
  426. /**********************************************************************/
  427. /**********************************************************************/
  428. /*                                      */
  429. /*  PRIVATE FUNCTION : GpfSetMaxWindow                      */
  430. /*                                      */
  431. /*  Positions the Window in the Max of the screen              */
  432. /*                                      */
  433. /**********************************************************************/
  434.  
  435. VOID FAR PASCAL GpfSetMaxWindow( HWND hwnd )
  436. {
  437.   int iScreenWidth, iScreenHeight;
  438.  
  439.   /*******************************************************************/
  440.   /* Query width and depth of screen device                 */
  441.   /*******************************************************************/
  442.   iScreenWidth    = GetSystemMetrics( SM_CXSCREEN );
  443.   iScreenHeight = GetSystemMetrics( SM_CYSCREEN );
  444.  
  445.   /*******************************************************************/
  446.   /* Top Window within the screen                     */
  447.   /*******************************************************************/
  448.   SetWindowPos( hwnd, NULL, 0 , 0 ,
  449.         iScreenWidth, iScreenHeight, SWP_NOZORDER );
  450. }
  451. /**********************************************************************/
  452. /* End of GpfSetMaxWindow Private Function                  */
  453. /**********************************************************************/
  454. /**********************************************************************/
  455.  
  456.  
  457. /**********************************************************************/
  458. /**********************************************************************/
  459. /*                                      */
  460. /* PRIVATE FUNCTION: GpfSetDialogBoxSysMenu                  */
  461. /*                                      */
  462. /* Edit items in the system menu to leave "Move", "Close", and          */
  463. /* "Switch to Task Manager".                          */
  464. /*                                      */
  465. /**********************************************************************/
  466. VOID FAR PASCAL GpfSetDialogBoxSysMenu( HWND hwnd )
  467. {
  468.   HWND       hSysMenu;        /* sys menu pull-down handle          */
  469.   WORD       wItemCount;        /* System menu items count              */
  470.   int       nItemIndex;        /* Item index                  */
  471.   WORD       wMenuID;        /* Menu Identificator              */
  472.  
  473.   /********************************************************************/
  474.   /* Get the handle of the system menu pull-down.              */
  475.   /* Destroying existing copy and get the original handle Menu          */
  476.   /********************************************************************/
  477.   hSysMenu = GetSystemMenu( hwnd, TRUE );
  478.  
  479.   /********************************************************************/
  480.   /* Remove all items from the system menu pull-down that are no      */
  481.   /* longer needed.                              */
  482.   /********************************************************************/
  483.  
  484.   wItemCount = GetMenuItemCount( hSysMenu );
  485.  
  486.   for ( nItemIndex = (int)wItemCount; nItemIndex != -1; nItemIndex-- )
  487.    {
  488.     wMenuID = GetMenuItemID( hSysMenu, nItemIndex );
  489.     if ( wMenuID != SC_MOVE   &&
  490.      wMenuID != SC_CLOSE  &&
  491.      wMenuID != SC_TASKLIST )
  492.        DeleteMenu( hSysMenu, nItemIndex, MF_BYPOSITION );
  493.    }
  494. }
  495. /**********************************************************************/
  496. /* End of GpfSetDialogBoxSysMenu Private Function              */
  497. /**********************************************************************/
  498. /**********************************************************************/
  499.  
  500. /************** Start of GpfSysMenuGray Private Function **************/
  501. /**********************************************************************/
  502. /* GpfSysMenuGray:                              */
  503. /* This function enables and disables choices (menu items) as required*/
  504. /**********************************************************************/
  505.  
  506. VOID FAR PASCAL GpfSysMenuGray(HWND hwnd, USHORT Item, BOOL option )
  507. {
  508.     HMENU   hSysMenu;
  509.  
  510.     hSysMenu = GetSystemMenu( hwnd, TRUE );
  511.     EnableMenuItem( hSysMenu, Item,
  512.       MF_BYCOMMAND | option ? (MF_GRAYED|MF_DISABLED) : MF_ENABLED);
  513. }
  514. /**********************************************************************/
  515. /*************** End of GpfSysMenuGray Private Function ***************/
  516. /**********************************************************************/
  517. /**********************************************************************/
  518.  
  519.  
  520. /***************** Start of GpfMenuGray Private Function **************/
  521. /**********************************************************************/
  522. /*                                      */
  523. /* PRIVATE FUNCTION : GpfMenuGray                      */
  524. /*                                      */
  525. /* This function enables and disables choices (menu items) as required*/
  526. /*                                      */
  527. /**********************************************************************/
  528.  
  529. VOID FAR PASCAL GpfMenuGray(HWND hwnd, USHORT Item, BOOL option )
  530. {
  531.     HMENU   hMenu;
  532.  
  533.     hMenu = GetMenu( hwnd );
  534.     EnableMenuItem( hMenu, Item,
  535.       MF_BYCOMMAND | option ? (MF_GRAYED|MF_DISABLED) : MF_ENABLED);
  536. }
  537. /**********************************************************************/
  538. /* End of GpfMenuGray Private Function                      */
  539. /**********************************************************************/
  540. /**********************************************************************/
  541.  
  542.  
  543. /***************** Start of GpfMenuTick Private Function **************/
  544. /**********************************************************************/
  545. /*                                      */
  546. /* PRIVATE FUNCTION : GpfMenuTick                      */
  547. /*                                      */
  548. /* This function updates the check marks against choices as required. */
  549. /*                                      */
  550. /**********************************************************************/
  551. VOID FAR PASCAL GpfMenuTick(HWND hwnd , USHORT Item, BOOL option )
  552. {
  553.     HMENU   hMenu;
  554.  
  555.     hMenu = GetMenu( hwnd );
  556.     CheckMenuItem( hMenu, Item,
  557.            MF_BYCOMMAND | option ? MF_CHECKED : MF_UNCHECKED);
  558. }
  559.  
  560. /**********************************************************************/
  561. /* End of GpfMenuTick Private Function                      */
  562. /**********************************************************************/
  563. /**********************************************************************/
  564.  
  565.  
  566.  
  567. /************** Start of GpfMenuSwapTick Private Function *************/
  568. /**********************************************************************/
  569. /*                                      */
  570. /* PRIVATE FUNCTION : GpfMenuSwapTick                      */
  571. /*                                      */
  572. /* This function updates-Swap the check marks.                  */
  573. /*                                      */
  574. /**********************************************************************/
  575. VOID FAR PASCAL GpfMenuSwapTick(HWND hwnd , USHORT Item )
  576. {
  577.     HMENU   hMenu;
  578.  
  579.     hMenu = GetMenu( hwnd );
  580.     if (CheckMenuItem( hMenu, Item, MF_BYCOMMAND | MF_CHECKED))
  581.     CheckMenuItem( hMenu, Item, MF_BYCOMMAND | MF_UNCHECKED);
  582. }
  583.  
  584. /**********************************************************************/
  585. /* End of GpfMenuTick Private Function                      */
  586. /**********************************************************************/
  587. /**********************************************************************/
  588.  
  589.  
  590.  
  591. /************* Start of GpfStringIsNumeric Private Function ***********/
  592. /**********************************************************************/
  593. /*                                      */
  594. /* PRIVATE FUNCTION : GpfStringIsNumeric                  */
  595. /*                                      */
  596. /**********************************************************************/
  597. BOOL FAR PASCAL GpfStringIsNumeric( UCHAR String[] )
  598. {
  599.  SHORT Index;
  600.  SHORT Length;
  601.  
  602.     Length = strlen(String);
  603.     if (!Length)
  604.        return FALSE;
  605.     for (Index = 0; Index < Length; Index++)
  606.     {
  607.      if (String[Index] < '0' || String[Index] > '9')
  608.          return FALSE;
  609.     }
  610.     return TRUE;
  611. }
  612.  
  613. /**********************************************************************/
  614. /* End of GpfStringIsNumeric Private Function                  */
  615. /**********************************************************************/
  616. /**********************************************************************/
  617.  
  618.  
  619.  
  620. /***************** Start of GpfSendMsg Private Function ***************/
  621. /**********************************************************************/
  622. /*                                      */
  623. /* PRIVATE FUNCTION : GpfSendMsg                      */
  624. /*                                      */
  625. /* Display, and operate the message box window                  */
  626. /**********************************************************************/
  627. SHORT FAR PASCAL GpfSendMsg( SHORT Id )
  628. {
  629.  UCHAR       String[256];
  630.  HWND       SysModalWindow;
  631.  USHORT    Reply = 0;
  632.  SHORT       Alarm = -1;
  633.  SHORT       Style = 0;
  634.  PUCHAR    Token1 = 0;
  635.  PUCHAR    Token2 = 0;
  636.  
  637.  /*********************************************************************/
  638.  /* Save Window (System Modal)                          */
  639.  /*********************************************************************/
  640.  SysModalWindow = GetSysModalWindow();
  641.  
  642.  /*********************************************************************/
  643.  /* Load Msg strings                              */
  644.  /*********************************************************************/
  645.  LoadString( hInstance, Id, String, sizeof(String) );
  646.  
  647.  Token1 = strchr(String,':');
  648.  if (Token1)
  649.     {
  650.      *Token1 = 0;
  651.      Alarm = atoi(String);
  652.      Token2 = strchr(++Token1,' ');
  653.      if (Token2)
  654.     {
  655.      *(Token2++) = 0;
  656.      Style = atoi(Token1);
  657.      /***************************************************/
  658.      /* Set Alarm                        */
  659.      /***************************************************/
  660.      if (Alarm != -1)
  661.          MessageBeep(0);
  662.      /***************************************************/
  663.      /* Now, display the message, save the button press */
  664.      /* for a return code.                    */
  665.      /* Pop up a Message box.                */
  666.      /***************************************************/
  667.      Reply = MessageBox( GetFocus(), Token2,
  668.                  szTaskList, Style );
  669.      /***************************************************/
  670.      /* Restore Window (System Modal)            */
  671.      /***************************************************/
  672.      if (SysModalWindow)
  673.          SetSysModalWindow(SysModalWindow);
  674.     }
  675.     }
  676.  return(Reply);
  677. }
  678.  
  679. /**********************************************************************/
  680. /* End of GpfSendMsg Private Function                      */
  681. /**********************************************************************/
  682. /**********************************************************************/
  683.  
  684.  
  685.  
  686. /***************** Start of GpfSendMsgInfo Function *******************/
  687. /**********************************************************************/
  688. /*                                      */
  689. /* FUNCTION : GpfSendMsgInfo                          */
  690. /*                                      */
  691. /* Display, and operate the message                      */
  692. /**********************************************************************/
  693. VOID FAR PASCAL GpfSendMsgInfo( PGPFPARMS pGpfParms, USHORT ShortMsgId )
  694. {
  695.   if (pGpfParms->ShortMsgId == ShortMsgId)
  696.       return;
  697.   if (!(AcceptMsgInfo | pGpfParms->ShortMsgId))
  698.       return;
  699.   if (!(AcceptMsgInfo))              /* Accept Msg Info ...   */
  700.       pGpfParms->ShortMsgId = 0;         /* No... Reset MsgId     */
  701.   else
  702.       pGpfParms->ShortMsgId = ShortMsgId;    /* Save Msg Id          */
  703.   GpfDisplayMsgInformation( pGpfParms );
  704. }
  705. /**********************************************************************/
  706. /* End of GpfSendMsgInfo Function                      */
  707. /**********************************************************************/
  708. /**********************************************************************/
  709.  
  710.  
  711. /**********************************************************************/
  712. /**********************************************************************/
  713. /*                                      */
  714. /*   PRIVATE FUNCTION: Initialize Application                  */
  715. /*                                      */
  716. /**********************************************************************/
  717.  
  718. static VOID InitializeApplication( VOID )
  719.  {
  720.  }
  721. /**********************************************************************/
  722. /* End of Private Function: Initialize Application              */
  723. /**********************************************************************/
  724. /**********************************************************************/
  725.  
  726.  
  727.  
  728. /**********************************************************************/
  729. /**********************************************************************/
  730. /*                                      */
  731. /*   PRIVATE FUNCTION: End Application                      */
  732. /*                                      */
  733. /**********************************************************************/
  734.  
  735. static VOID EndApplication( VOID )
  736.  {
  737.  
  738.    EndOfAppl = TRUE;
  739.  
  740.  }
  741. /**********************************************************************/
  742. /* End of Private Function: End Application                  */
  743. /**********************************************************************/
  744. /**********************************************************************/
  745.  
  746.  
  747.  
  748. /**********************************************************************/
  749. /**********************************************************************/
  750. /*                                      */
  751. /*   STATIC PRIVATE FUNCTION: WmCreateMainWindow              */
  752. /*                                      */
  753. /*   WM_CREATE - Create - "MainWindow".                   */
  754. /*                                      */
  755. /**********************************************************************/
  756.  
  757. static VOID WmCreateMainWindow ( PGPFPARMS pGpfParms )
  758.  {
  759.     pGpfParms->mresult = (LONG) FALSE;    /* Set Return Code      */
  760.     CreateThreads();
  761.  }
  762. /**********************************************************************/
  763. /* End of Function: WmCreateMainWindow                       */
  764. /**********************************************************************/
  765. /**********************************************************************/
  766.  
  767.  
  768.  
  769. /**********************************************************************/
  770. /**********************************************************************/
  771. /*                                      */
  772. /*   STATIC PRIVATE FUNCTION: WmPaintMainWindow               */
  773. /*                                      */
  774. /*   WM_PAINT - Paint - "MainWindow".                      */
  775. /*                                      */
  776. /**********************************************************************/
  777.  
  778. static VOID WmPaintMainWindow ( PGPFPARMS pGpfParms )
  779.  {
  780.     pGpfParms->mresult = (LONG) FALSE;    /* Set Return Code      */
  781.     PaintWindow(pGpfParms);
  782.  }
  783. /**********************************************************************/
  784. /* End of Function: WmPaintMainWindow                       */
  785. /**********************************************************************/
  786. /**********************************************************************/
  787.  
  788.  
  789. /**********************************************************************/
  790. /**********************************************************************/
  791. /*                                      */
  792. /*   FUNCTION: ShowMainWindow                          */
  793. /*                                      */
  794. /*   Show Window "MainWindow".                          */
  795. /*                                      */
  796. /**********************************************************************/
  797.  
  798. BOOL  ShowMainWindow( LPVOID pCrtParms )
  799.  {
  800.  
  801.               /* Make sure the window was not created. */
  802.    if (!hwndMainWindow)
  803.     CreateMainWindow( pCrtParms );
  804.    ShowWindow( hwndMainWindow, SW_SHOWNORMAL );
  805.    UpdateWindow( hwndMainWindow );
  806.    SetFocus( hwndMainWindow );
  807.    return(FALSE);
  808.  }
  809. /**********************************************************************/
  810. /* End of Function - ShowMainWindow                      */
  811. /**********************************************************************/
  812. /**********************************************************************/
  813.  
  814.  
  815.  
  816. /**********************************************************************/
  817. /**********************************************************************/
  818. /*                                      */
  819. /*   FUNCTION: DismissMainWindow                      */
  820. /*                                      */
  821. /*   Dismiss Window Hide - Window "MainWindow".               */
  822. /*                                      */
  823. /**********************************************************************/
  824.  
  825. VOID  DismissMainWindow( BOOL Rcode )
  826.  {
  827.  
  828.    Rcode = Rcode;  /* Null , For Delete Unreferenced Formal Parameter */
  829.                                /* Hide Window */
  830.    ShowWindow( hwndMainWindow, SW_HIDE );
  831.  
  832.  }
  833. /**********************************************************************/
  834. /* End of Function - DismissMainWindow                      */
  835. /**********************************************************************/
  836. /**********************************************************************/
  837.  
  838.  
  839.  
  840. /**********************************************************************/
  841. /**********************************************************************/
  842. /*                                      */
  843. /*   FUNCTION: CreateMainWindow                       */
  844. /*                                      */
  845. /*   Create the window "MainWindow" And Controls.              */
  846. /*                                      */
  847. /**********************************************************************/
  848.  
  849. VOID CreateMainWindow( LPVOID pCrtParms )
  850.  {
  851.   WNDCLASS wc;
  852.  
  853.   /********************************************************************/
  854.   /*   Register the window class "MainWindow".                  */
  855.   /********************************************************************/
  856.   wc.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
  857.   wc.lpfnWndProc = fnwpMainWindow;         /* Window procedure  */
  858.   wc.cbClsExtra  = EXTRAWORDS;
  859.   wc.cbWndExtra  = DLGWINDOWEXTRA + EXTRAWORDS;
  860.   wc.hInstance     = hInstance;
  861.   wc.hIcon = LoadIcon( hInstance, MAKEINTRESOURCE(ID_MAINWINDOW) );
  862.   wc.hCursor = LoadCursor( NULL, IDC_ARROW );
  863.   wc.hbrBackground = (HBRUSH)CTLCOLOR_DLG;
  864.   wc.lpszMenuName  = "MainWindow";         /* Window Menu name  */
  865.   wc.lpszClassName = "MainWindow";         /* Window class name */
  866.   RegisterClass( &wc );
  867.  
  868.   /********************************************************************/
  869.   /*   Create the window "MainWindow".                      */
  870.   /********************************************************************/
  871.   hwndMainWindow =                     /* Save Hwnd     */
  872.   GpfCreateTemplate( hInstance,
  873.              "MainWindow",             /* Template Name */
  874.              HWND_DESKTOP,             /* Hwnd Owner    */
  875.              ID_MAINWINDOW,             /* Id          */
  876.              pCrtParms );             /* Create Parms  */
  877.  }
  878. /**********************************************************************/
  879. /* End of Function - CreateMainWindow                      */
  880. /**********************************************************************/
  881. /**********************************************************************/
  882.  
  883.  
  884.  
  885. /**********************************************************************/
  886. /**********************************************************************/
  887. /*                                      */
  888. /*  WinProc: fnwpMainWindow                          */
  889. /*                                      */
  890. /*  Controls the "MainWindow" Area.                      */
  891. /*                                      */
  892. /*                                      */
  893. /**********************************************************************/
  894.  
  895. LONG FAR PASCAL fnwpMainWindow(
  896.             HWND hwnd, USHORT msg, WORD wParam, DWORD dwParam )
  897. {
  898.   static    GPFPARMS  GpfParms;   /* Gpf Parameters             */
  899.   PGPFPARMS pGpfParms;          /* Far Pointer             */
  900.   LONG        mresult;              /* Work mresult             */
  901.   USHORT    uShort;              /* Work uShort             */
  902.   /*******************************************************************/
  903.   /* Initialize Gpf Parameters                         */
  904.   /*******************************************************************/
  905.   pGpfParms = &GpfParms;        /* Initialize Gpf Parameters */
  906.   pGpfParms->hwnd    = hwnd;        /* window handle         */
  907.   pGpfParms->msg     = msg;        /* message number         */
  908.   pGpfParms->wParam  = wParam;        /* 1st (packed) parms         */
  909.   pGpfParms->dwParam = dwParam;     /* 2nd (packed) parms         */
  910.   pGpfParms->mresult = (LONG)FALSE;    /* Mresult             */
  911.   pGpfParms->hdc     = (HDC)0;        /* Paint (HDC)             */
  912.   pGpfParms->Command = 0;        /* Command From wParam (SHORT 1) */
  913.   pGpfParms->Notify  = 0;        /* Notify  From wParam (SHORT 2) */
  914.  
  915.   mresult  = (LONG)NULL;        /* Work mresult           */
  916.   uShort   = 0;             /* Work uShort           */
  917.  
  918.   switch(msg)
  919.   {
  920.     /**************************************************************/
  921.     /* Things to do when the Window is first initalized          */
  922.     /**************************************************************/
  923.    case WM_INITDIALOG:
  924.     pGpfParms->pCrtParms = (LPVOID) dwParam;
  925.     return (pGpfParms->mresult);
  926.  
  927.  
  928.     /**************************************************************/
  929.     /* The application has asked for the window to be created.    */
  930.     /**************************************************************/
  931.    case WM_CREATE:
  932.     hwndMainWindow = hwnd;                 /* Save Hwnd */
  933.     pGpfParms->BgColor = (HBRUSH)CTLCOLOR_DLG;
  934.     pGpfParms->hInstance  = hInstance;
  935.     pGpfParms->ShortMsgId = 0;      /* Current Short Message Id */
  936.     WmCreateMainWindow( pGpfParms );        /* Create  Window */
  937.     return GpfDefWindowProc( hwnd, msg, wParam, dwParam );
  938.  
  939.     /**************************************************************/
  940.     /* The application has asked for the window to be destroyed.  */
  941.     /**************************************************************/
  942.    case WM_DESTROY:
  943.     GpfDestroyTemplate( hwnd );           /* Reset Help Instance */
  944.     hwndMainWindow = (HWND)NULL;            /* Reset Hwnd */
  945.     return GpfDefWindowProc( hwnd, msg, wParam, dwParam );
  946.  
  947.     /**************************************************************/
  948.     /* The window needs EraseBackGround.                  */
  949.     /**************************************************************/
  950.    case WM_ERASEBKGND:
  951.     return( DefDlgProc(hwnd, msg, wParam, dwParam) );
  952.  
  953.     /**************************************************************/
  954.     /* The window needs Ctl Color.                      */
  955.     /**************************************************************/
  956.    case WM_CTLCOLOR:
  957.     SetBkMode((HDC)wParam,TRANSPARENT);
  958.     return(pGpfParms->BgColor);
  959.  
  960.     /**************************************************************/
  961.     /* The window needs painting.                      */
  962.     /**************************************************************/
  963.    case WM_PAINT:
  964.     /**************************************************************/
  965.     /* Obtain a cache PS                          */
  966.     /**************************************************************/
  967.     pGpfParms->hdc = BeginPaint( hwnd, &pGpfParms->ps );
  968.     WmPaintMainWindow( pGpfParms );     /* Paint Window       */
  969.     EndPaint( hwnd, &pGpfParms->ps );
  970.     return (LONG)FALSE;
  971.  
  972.     /**************************************************************/
  973.     /* Process ScrollBar received from the user              */
  974.     /**************************************************************/
  975.    case WM_HSCROLL:
  976.    case WM_VSCROLL:
  977.     pGpfParms->Notify = wParam;
  978.     pGpfParms->Command = HIWORD( dwParam );
  979.     CommandMainWindow( pGpfParms );       /* Process the command  */
  980.     return (pGpfParms->mresult);
  981.  
  982.     /**************************************************************/
  983.     /* Process commands received from the user              */
  984.     /**************************************************************/
  985.    case WM_SYSCOMMAND:
  986.    case WM_COMMAND:
  987.     /* Set Command From wParam */
  988.     pGpfParms->Command = wParam;
  989.     pGpfParms->Notify = HIWORD( dwParam );
  990.     CommandMainWindow( pGpfParms );       /* Process the command  */
  991.     return GpfDefWindowProc( hwnd, msg, wParam, dwParam );
  992.  
  993.     /**************************************************************/
  994.     /* Message from system to close the client window.          */
  995.     /**************************************************************/
  996.    case WM_CLOSE:
  997.     pGpfParms->Command = IDCANCEL;
  998.     pGpfParms->Notify = BN_CLICKED;
  999.     CommandMainWindow( pGpfParms );       /* Process the command  */
  1000.     if (!pGpfParms->mresult)
  1001.         PostQuitMessage( 0 );         /* Cause termination */
  1002.  
  1003.     /**************************************************************/
  1004.     /* All other messages are passed to the default procedure.    */
  1005.     /**************************************************************/
  1006.    default:
  1007.     /* Pass all other messages to the default window procedure    */
  1008.     return GpfDefWindowProc( hwnd, msg, wParam, dwParam );
  1009.   }
  1010.   return ((LONG)FALSE);
  1011. }
  1012. /**********************************************************************/
  1013. /* End of window procedure - WinProc: fnwpMainWindow              */
  1014. /**********************************************************************/
  1015. /**********************************************************************/
  1016.  
  1017.  
  1018.  
  1019. /**********************************************************************/
  1020. /**********************************************************************/
  1021. /*                                      */
  1022. /*   PRIVATE FUNCTION: CommandMainWindow                  */
  1023. /*                                      */
  1024. /*   Takes appropriate action when a WM_COMMAND/WM_CONTROL message is */
  1025. /*   received by the window procedure.                      */
  1026. /*   Window "MainWindow".                          */
  1027. /*                                      */
  1028. /**********************************************************************/
  1029.  
  1030. static VOID CommandMainWindow ( PGPFPARMS pGpfParms )
  1031. {
  1032.   pGpfParms->mresult = (LONG)TRUE;        /* Set Return Code    */
  1033.   /* Switch according to Control chosen                   */
  1034.   switch( pGpfParms->Command )
  1035.   {
  1036.     /******************************************************************/
  1037.     /* Name  "Rep10".                              */
  1038.     /* Text  "10".                              */
  1039.     /******************************************************************/
  1040.     case ID_REP10:
  1041.      ActionRep10(pGpfParms);
  1042.      return;
  1043.     /******************************************************************/
  1044.     /* Name  "Rep100".                              */
  1045.     /* Text  "100".                              */
  1046.     /******************************************************************/
  1047.     case ID_REP100:
  1048.      ActionRep100(pGpfParms);
  1049.      return;
  1050.     /******************************************************************/
  1051.     /* Name  "Rep1000".                           */
  1052.     /* Text  "1000".                              */
  1053.     /******************************************************************/
  1054.     case ID_REP1000:
  1055.      ActionRep1000(pGpfParms);
  1056.      return;
  1057.     /******************************************************************/
  1058.     /* Name  "Rep10000".                          */
  1059.     /* Text  "10000".                              */
  1060.     /******************************************************************/
  1061.     case ID_REP10000:
  1062.      ActionRep10000(pGpfParms);
  1063.      return;
  1064.     /******************************************************************/
  1065.     /* Name  "Start".                              */
  1066.     /* Text  "~Start".                              */
  1067.     /******************************************************************/
  1068.     case ID_START:
  1069.      ActionStart(pGpfParms);
  1070.      return;
  1071.     /******************************************************************/
  1072.     /* Name  "Abort".                              */
  1073.     /* Text  "~Abort".                              */
  1074.     /******************************************************************/
  1075.     case ID_ABORT:
  1076.      ActionAbort(pGpfParms);
  1077.      return;
  1078.   }
  1079.   /* Take no action for any other selections                  */
  1080.   pGpfParms->mresult = (LONG)FALSE;        /* Set Return Code    */
  1081. }
  1082. /**********************************************************************/
  1083. /* End of Private Function: CommandMainWindow                  */
  1084. /**********************************************************************/
  1085. /**********************************************************************/
  1086.  
  1087.  
  1088. /**********************************************************************/
  1089. /**********************************************************************/
  1090. /*                                      */
  1091. /*   STATIC PRIVATE FUNCTION: ActionRep10                  */
  1092. /*                                      */
  1093. /*   Takes appropriate action when a WM_COMMAND/WM_CONTROL message is */
  1094. /*   received by the window procedure.                      */
  1095. /*   Window "MainWindow".                          */
  1096. /*                                      */
  1097. /**********************************************************************/
  1098.  
  1099. static VOID ActionRep10( PGPFPARMS pGpfParms )
  1100. {
  1101.   /* Switch according to Control chosen                   */
  1102.   switch( pGpfParms->Notify )
  1103.   {
  1104.    case BN_CLICKED:
  1105.     SelectRep(pGpfParms);
  1106.     return;
  1107.   }
  1108.   /* Take no action for any other selections                  */
  1109. }
  1110. /**********************************************************************/
  1111. /* End of Private Function                          */
  1112. /**********************************************************************/
  1113. /**********************************************************************/
  1114.  
  1115.  
  1116. /**********************************************************************/
  1117. /**********************************************************************/
  1118. /*                                      */
  1119. /*   STATIC PRIVATE FUNCTION: ActionRep100                  */
  1120. /*                                      */
  1121. /*   Takes appropriate action when a WM_COMMAND/WM_CONTROL message is */
  1122. /*   received by the window procedure.                      */
  1123. /*   Window "MainWindow".                          */
  1124. /*                                      */
  1125. /**********************************************************************/
  1126.  
  1127. static VOID ActionRep100( PGPFPARMS pGpfParms )
  1128. {
  1129.   /* Switch according to Control chosen                   */
  1130.   switch( pGpfParms->Notify )
  1131.   {
  1132.    case BN_CLICKED:
  1133.     SelectRep(pGpfParms);
  1134.     return;
  1135.   }
  1136.   /* Take no action for any other selections                  */
  1137. }
  1138. /**********************************************************************/
  1139. /* End of Private Function                          */
  1140. /**********************************************************************/
  1141. /**********************************************************************/
  1142.  
  1143.  
  1144. /**********************************************************************/
  1145. /**********************************************************************/
  1146. /*                                      */
  1147. /*   STATIC PRIVATE FUNCTION: ActionRep1000                  */
  1148. /*                                      */
  1149. /*   Takes appropriate action when a WM_COMMAND/WM_CONTROL message is */
  1150. /*   received by the window procedure.                      */
  1151. /*   Window "MainWindow".                          */
  1152. /*                                      */
  1153. /**********************************************************************/
  1154.  
  1155. static VOID ActionRep1000( PGPFPARMS pGpfParms )
  1156. {
  1157.   /* Switch according to Control chosen                   */
  1158.   switch( pGpfParms->Notify )
  1159.   {
  1160.    case BN_CLICKED:
  1161.     SelectRep(pGpfParms);
  1162.     return;
  1163.   }
  1164.   /* Take no action for any other selections                  */
  1165. }
  1166. /**********************************************************************/
  1167. /* End of Private Function                          */
  1168. /**********************************************************************/
  1169. /**********************************************************************/
  1170.  
  1171.  
  1172. /**********************************************************************/
  1173. /**********************************************************************/
  1174. /*                                      */
  1175. /*   STATIC PRIVATE FUNCTION: ActionRep10000                  */
  1176. /*                                      */
  1177. /*   Takes appropriate action when a WM_COMMAND/WM_CONTROL message is */
  1178. /*   received by the window procedure.                      */
  1179. /*   Window "MainWindow".                          */
  1180. /*                                      */
  1181. /**********************************************************************/
  1182.  
  1183. static VOID ActionRep10000( PGPFPARMS pGpfParms )
  1184. {
  1185.   /* Switch according to Control chosen                   */
  1186.   switch( pGpfParms->Notify )
  1187.   {
  1188.    case BN_CLICKED:
  1189.     SelectRep(pGpfParms);
  1190.     return;
  1191.   }
  1192.   /* Take no action for any other selections                  */
  1193. }
  1194. /**********************************************************************/
  1195. /* End of Private Function                          */
  1196. /**********************************************************************/
  1197. /**********************************************************************/
  1198.  
  1199.  
  1200. /**********************************************************************/
  1201. /**********************************************************************/
  1202. /*                                      */
  1203. /*   STATIC PRIVATE FUNCTION: ActionStart                  */
  1204. /*                                      */
  1205. /*   Takes appropriate action when a WM_COMMAND/WM_CONTROL message is */
  1206. /*   received by the window procedure.                      */
  1207. /*   Window "MainWindow".                          */
  1208. /*                                      */
  1209. /**********************************************************************/
  1210.  
  1211. static VOID ActionStart( PGPFPARMS pGpfParms )
  1212. {
  1213.   /* Switch according to Control chosen                   */
  1214.   switch( pGpfParms->Notify )
  1215.   {
  1216.    case BN_CLICKED:
  1217.     StartSalvage(pGpfParms);
  1218.     return;
  1219.   }
  1220.   /* Take no action for any other selections                  */
  1221. }
  1222. /**********************************************************************/
  1223. /* End of Private Function                          */
  1224. /**********************************************************************/
  1225. /**********************************************************************/
  1226.  
  1227.  
  1228. /**********************************************************************/
  1229. /**********************************************************************/
  1230. /*                                      */
  1231. /*   STATIC PRIVATE FUNCTION: ActionAbort                  */
  1232. /*                                      */
  1233. /*   Takes appropriate action when a WM_COMMAND/WM_CONTROL message is */
  1234. /*   received by the window procedure.                      */
  1235. /*   Window "MainWindow".                          */
  1236. /*                                      */
  1237. /**********************************************************************/
  1238.  
  1239. static VOID ActionAbort( PGPFPARMS pGpfParms )
  1240. {
  1241.   /* Switch according to Control chosen                   */
  1242.   switch( pGpfParms->Notify )
  1243.   {
  1244.    case BN_CLICKED:
  1245.     AbortSalvage(pGpfParms);
  1246.     return;
  1247.   }
  1248.   /* Take no action for any other selections                  */
  1249. }
  1250. /**********************************************************************/
  1251. /* End of Private Function                          */
  1252. /**********************************************************************/
  1253. /**********************************************************************/
  1254.  
  1255.